<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>找回密码页面</title>
<link rel="stylesheet" 
	href=${pageContext.servletContext.contextPath}/js/bootstrap.min.css>
	
<link rel="stylesheet" type="text/css" href=${pageContext.servletContext.contextPath}/themes/default/easyui.css>   
<link rel="stylesheet" type="text/css" href=${pageContext.servletContext.contextPath}/themes/icon.css> 
<link rel="stylesheet" type="text/css" href=${pageContext.servletContext.contextPath}/themes/bootstrap/easyui.css>  
<script type="text/javascript" src=${pageContext.servletContext.contextPath}/js/jquery.min.js></script>   
<script type="text/javascript" src=${pageContext.servletContext.contextPath}/js/jquery.easyui.min.js></script> 
<script type="text/javascript" src=${pageContext.servletContext.contextPath}/js/easyui-lang-zh_CN.js></script>
<script type="text/javascript"
	src=${pageContext.servletContext.contextPath}/js/bootstrap.min.js></script>
<style>
#title{
background:url(img/eee.png);
}
#mleft{
background:url(img/eee.png);
}
</style>
</head>
<script>
$(function(){
	$('#uid').blur( function () {
		var req=/^[0-9]{1,}$/;
	    if(!req.test($('#uid').val())){
	    	$('#msg').show();
	    }
	} );
	$("#bn").click(function(){
		if($("#uname").val()==''){
			alert('请输入用户名！')
		}else if($("#uid").val()==''){
			alert('请输入用户id！')
		}else if($("#rid").val()==8){
			alert('请选择职位！')
		}else{
		$.ajax({
			url:"findpsd",
    		dataType:"json",
    		data:{
    			uname:$("#uname").val(),
    			uid:$("#uid").val(),
    			rid:$("#rid").val()
    			},
    		type:'post',
    		success:function(r){
    			if(r.upsd!=undefined){
    			alert("你的密码是："+r.upsd)
    			}else{
    				alert('信息验证失败!')
    			}
    		    
    			$("#uname").val(''),
    			$("#uid").val(''),
    			$("#rid").val('volvo')
    		}
		})
		}
	})
})
</script>
<body>

<div class="container" >
  <div class="row">
  <div id="title" class="col-md-12" style="height: 150px"><h1 align="center">找回密码页面</h1></div>
</div>
<div class="row">
  <div id="mleft" class="col-md-2" style="height: 800px"><h3>点餐系统账号</h3></div>
  <div class="col-md-10" style="background-color: #d9f0f2;height: 800px">
  <div align="center" style="position:absolute;left:250px">
  <form>
  <h4>用户名:</h4><input class="form-control" type="text" style="width:300px" id="uname">
  <h4>用户id:</h4><input class="form-control" type="text" style="width:300px" id="uid">
  <div id="msg" style="display:none">
  <h5 style="position:absolute;left:200px;top:90px;color:red">用户id为数字</h5>
  </div>
  <h4>用户职位:</h4>
  <select id="rid" class="btn btn-default dropdown-toggle" style="width:300px">
  <option value ="8">请选择...</option>
  <option value ="1">点菜员</option>
  <option value ="2">后厨</option>
  <option value="3">经理</option>
</select>
 </form>
<br><br><br>
<div align="center">
<button id="bn" class="btn btn-info" style="width: 250px">找回密码</button>
</div>
  
  </div>

  </div>
</div>
</div>
</body>
</html>